package conchmusic.conchmusicclient.popupWindow;

import android.app.Activity;
import android.app.Dialog;
import android.graphics.drawable.ColorDrawable;
import android.os.Bundle;
import android.view.Display;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.Button;

import conchmusic.conchmusicclient.R;

public class SongOperatePopup extends Dialog {
    Activity context;
    private View.OnClickListener mmClickListener;

    private Button btn_addtoOther;
    private Button btn_rm;
    private Button btn_rmAndDlt;
    private Button cancel;
    private Button btn_download;

    public SongOperatePopup(Activity context) {
        super(context);
        this.context=context;
    }

    public SongOperatePopup(Activity context, int theme, View.OnClickListener clickListener){
        super(context,theme);
        this.context=context;
        this.mmClickListener=clickListener;

    }




    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.song_operate_popup);
        Window dialogWindow=this.getWindow();
        WindowManager manager=context.getWindowManager();
        Display display=manager.getDefaultDisplay();
        WindowManager.LayoutParams params=dialogWindow.getAttributes();
        params.width=(int)(display.getWidth()*1);
        params.height=(int)(display.getHeight()*1);
        dialogWindow.setAttributes(params);
        ColorDrawable dw = new ColorDrawable(0xb0000000);
        dialogWindow.setBackgroundDrawable(dw);
        btn_addtoOther=(Button)findViewById(R.id.id_addtoOther);
        btn_addtoOther.setOnClickListener(mmClickListener);
        btn_rm=(Button)findViewById(R.id.id_rm);
        btn_rm.setOnClickListener(mmClickListener);
        btn_rmAndDlt=(Button)findViewById(R.id.id_rm_and_dlt);
        btn_rmAndDlt.setOnClickListener(mmClickListener);
        btn_download=(Button)findViewById(R.id.id_download);
        btn_download.setOnClickListener(mmClickListener);
        cancel=(Button)findViewById(R.id.songcancel);
        cancel.setOnClickListener(mmClickListener);
        this.setCancelable(true);


    }


}
